var myApp = angular.module("myApp", []);

/*自定义指令*/
myApp.directive('myDirective', function() {
return {
restrict: 'E',
//replace:true,
scope:{
		linkUrl:'@',
		linkText:'@'
},
template: '<a target=_blank href="{{linkUrl}}">{{linkText}}</a>'
};
})

/*第二个指令*/
myApp.directive('myDirective2', function() {
         return {
             restrict: 'A',
             replace: true,
             scope: {
									myUrl: '=someAttr', // 经过了修改
                 	myLinkText: '@'
             },
             template:
            '<div>'+
            '     <label>My Url Field:</label>'+
            '     <input type="text"'+
            '    ng-model="myUrl" />'+
            '     <a href="{{myUrl}}">{{myLinkText}}</a>'+
						'</div>'};
});
myApp.directive('myDirective3', function() {
    return {

        template: 'Inside myDirective, isolate scope: {{ myProperty }}',
scope: {} };
});
myApp.directive('myInheritScopeDirective', function() {
    return {

        template: 'Inside myDirective, isolate scope: {{ myProperty }}',
        scope: true
};
});
